package a.j;

import java.awt.*;
import java.awt.geom.GeneralPath;
import java.awt.geom.Rectangle2D;

public class o
  extends n
  implements md.l_
{
  public static final String f = "y.view.ShadowNodePainter.SHADOW_PAINTING";
  private double g = 3.0D;
  private double h = 2.0D;
  private boolean i;
  private Color j = bd.c;
  public static boolean k;
  
  protected void a(ld paramld, Graphics2D paramGraphics2D, boolean paramBoolean)
  {
    boolean bool = ld.E;
    if (!bool)
    {
      if (paramBoolean)
      {
        if (bool) {
          break label34;
        }
        k(paramld, paramGraphics2D);
      }
    }
    else if (!ld.D) {
      return;
    }
    label34:
    l(paramld, paramGraphics2D);
  }
  
  private void k(ld paramld, Graphics2D paramGraphics2D)
  {
    Rectangle2D.Double localDouble = paramld.O();
    if (!ld.E) {
      if (g(paramld, paramGraphics2D)) {
        paramGraphics2D.fillRect((int)localDouble.getX(), (int)localDouble.getY(), (int)localDouble.getWidth(), (int)localDouble.getHeight());
      }
    }
    if (f(paramld, paramGraphics2D)) {
      paramGraphics2D.drawRect((int)localDouble.getX(), (int)localDouble.getY(), (int)localDouble.getWidth(), (int)localDouble.getHeight());
    }
  }
  
  private void l(ld paramld, Graphics2D paramGraphics2D)
  {
    boolean bool3 = ld.E;
    boolean bool2 = ld.D;
    Rectangle2D.Double localDouble = paramld.O();
    double d1 = a(paramld);
    double d2 = b(paramld);
    Object localObject1;
    if (!bool3) {
      if (bd.a(paramld, paramGraphics2D, c(paramld)))
      {
        float f1 = (float)localDouble.getX();
        float f2 = (float)localDouble.getY();
        float f3 = (float)localDouble.getWidth();
        float f4 = (float)localDouble.getHeight();
        localObject1 = hb.a().o;
        ((bd)localObject1).a(d(paramld));
        ((bd)localObject1).a(d1 + d2);
        ((bd)localObject1).a(paramGraphics2D, f1, f2, f3, f4);
      }
    }
    boolean bool1 = j(paramld, paramGraphics2D);
    Color localColor1 = d(paramld, bool1);
    Color localColor2 = a(paramld, bool1);
    GeneralPath localGeneralPath;
    if (!bool3) {
      if (localColor1 != null)
      {
        localGeneralPath = new GeneralPath(1, 32);
        c(localGeneralPath, localDouble.getX(), localDouble.getY() + localDouble.getHeight() * 0.5D - 1.0D, localDouble.getWidth(), localDouble.getHeight() * 0.5D + 1.0D, d1);
        paramGraphics2D.setColor(localColor1);
        paramGraphics2D.fill(localGeneralPath);
        b(localGeneralPath, localDouble.getX(), localDouble.getY(), localDouble.getWidth(), localDouble.getHeight() * 0.5D, d1);
        localObject1 = f(paramld, bool1);
        if ((bool3) || (localObject1 == null)) {
          localObject1 = Color.WHITE;
        }
        if (!bool3) {
          if (c(paramGraphics2D))
          {
            localObject2 = new GradientPaint((float)localDouble.getX(), (float)(localDouble.getY() - 1.0D), a((Color)localObject1, localColor1, 0.75F), (float)localDouble.getX(), (float)(localDouble.getY() + localDouble.getHeight() + 0.5D + 1.0D), a((Color)localObject1, localColor1, 0.2F));
            paramGraphics2D.setPaint((Paint)localObject2);
            if (bool3) {
              break label425;
            }
            if (!bool2) {
              break label374;
            }
          }
        }
        paramGraphics2D.setColor(a((Color)localObject1, localColor1, 0.75F));
        label374:
        paramGraphics2D.fill(localGeneralPath);
        a(localGeneralPath, localDouble.getX() + d2, localDouble.getY() + d2, localDouble.getWidth() - d2 - d2, localDouble.getHeight() - d2 - d2, d1 - d2);
        label425:
        Object localObject2 = new BasicStroke(2.0F);
        if (!bool3) {}
        paramGraphics2D.setColor(a(localColor2 != null ? localColor2 : localColor1, (Color)localObject1, 0.15F));
        paramGraphics2D.setStroke((Stroke)localObject2);
        paramGraphics2D.draw(localGeneralPath);
        if (!bool3) {}
        paramGraphics2D.setColor(localColor2 != null ? localColor2 : localColor1);
        paramGraphics2D.setStroke(new BasicStroke(1.0F));
        paramGraphics2D.draw(localGeneralPath);
      }
    }
    if ((bool2) && (localColor2 != null))
    {
      localGeneralPath = new GeneralPath(1, 32);
      a(localGeneralPath, localDouble.getX() + d2, localDouble.getY() + d2, localDouble.getWidth() - d2 - d2, localDouble.getHeight() - d2 - d2, d1 - d2);
      paramGraphics2D.setColor(localColor2);
      paramGraphics2D.setStroke(new BasicStroke(1.0F));
      paramGraphics2D.draw(localGeneralPath);
    }
  }
  
  private static GeneralPath a(GeneralPath paramGeneralPath, double paramDouble1, double paramDouble2, double paramDouble3, double paramDouble4, double paramDouble5)
  {
    paramGeneralPath.reset();
    float f1 = (float)Math.min(paramDouble3 * 0.5D, paramDouble5);
    float f2 = (float)Math.min(paramDouble4 * 0.5D, paramDouble5);
    float f3 = (float)paramDouble1;
    float f4 = (float)paramDouble2;
    float f5 = (float)paramDouble3;
    float f6 = (float)paramDouble4;
    paramGeneralPath.moveTo(f3, f4 + f2);
    paramGeneralPath.quadTo(f3, f4, f3 + f1, f4);
    paramGeneralPath.lineTo(f3 + f5 - f1, f4);
    paramGeneralPath.quadTo(f3 + f5, f4, f3 + f5, f4 + f2);
    paramGeneralPath.lineTo(f3 + f5, f4 + f6 - f2);
    paramGeneralPath.quadTo(f3 + f5, f4 + f6, f3 + f5 - f1, f4 + f6);
    paramGeneralPath.lineTo(f3 + f1, f4 + f6);
    paramGeneralPath.quadTo(f3, f4 + f6, f3, f4 + f6 - f2);
    paramGeneralPath.closePath();
    return paramGeneralPath;
  }
  
  private static GeneralPath b(GeneralPath paramGeneralPath, double paramDouble1, double paramDouble2, double paramDouble3, double paramDouble4, double paramDouble5)
  {
    paramGeneralPath.reset();
    float f1 = (float)Math.min(paramDouble3 * 0.5D, paramDouble5);
    float f2 = (float)Math.min(paramDouble4, paramDouble5);
    float f3 = (float)paramDouble1;
    float f4 = (float)paramDouble2;
    float f5 = (float)paramDouble3;
    float f6 = (float)paramDouble4;
    paramGeneralPath.moveTo(f3, f4 + f2);
    paramGeneralPath.quadTo(f3, f4, f3 + f1, f4);
    paramGeneralPath.lineTo(f3 + f5 - f1, f4);
    paramGeneralPath.quadTo(f3 + f5, f4, f3 + f5, f4 + f2);
    paramGeneralPath.lineTo(f3 + f5, f4 + f6);
    paramGeneralPath.lineTo(f3, f4 + f6);
    paramGeneralPath.closePath();
    return paramGeneralPath;
  }
  
  private static GeneralPath c(GeneralPath paramGeneralPath, double paramDouble1, double paramDouble2, double paramDouble3, double paramDouble4, double paramDouble5)
  {
    paramGeneralPath.reset();
    float f1 = (float)Math.min(paramDouble3 * 0.5D, paramDouble5);
    float f2 = (float)Math.min(paramDouble4, paramDouble5);
    float f3 = (float)paramDouble1;
    float f4 = (float)paramDouble2;
    float f5 = (float)paramDouble3;
    float f6 = (float)paramDouble4;
    paramGeneralPath.moveTo(f3, f4);
    paramGeneralPath.lineTo(f3 + f5, f4);
    paramGeneralPath.lineTo(f3 + f5, f4 + f6 - f2);
    paramGeneralPath.quadTo(f3 + f5, f4 + f6, f3 + f5 - f1, f4 + f6);
    paramGeneralPath.lineTo(f3 + f1, f4 + f6);
    paramGeneralPath.quadTo(f3, f4 + f6, f3, f4 + f6 - f2);
    paramGeneralPath.closePath();
    return paramGeneralPath;
  }
  
  private static Color a(Color paramColor1, Color paramColor2, float paramFloat)
  {
    float f1 = 1.0F - paramFloat;
    float f2 = paramColor1.getAlpha() * paramFloat + paramColor2.getAlpha() * f1;
    float f3 = paramColor1.getRed() * paramFloat + paramColor2.getRed() * f1;
    float f4 = paramColor1.getGreen() * paramFloat + paramColor2.getGreen() * f1;
    float f5 = paramColor1.getBlue() * paramFloat + paramColor2.getBlue() * f1;
    return new Color(Math.round(f3), Math.round(f4), Math.round(f5), Math.round(f2));
  }
  
  protected double a(ld paramld)
  {
    return a();
  }
  
  public double a()
  {
    return this.g;
  }
  
  public void a(double paramDouble)
  {
    this.g = paramDouble;
  }
  
  protected double b(ld paramld)
  {
    return b();
  }
  
  public double b()
  {
    return this.h;
  }
  
  public void b(double paramDouble)
  {
    this.h = paramDouble;
  }
  
  protected boolean c(ld paramld)
  {
    return c();
  }
  
  public boolean c()
  {
    return this.i;
  }
  
  public void a(boolean paramBoolean)
  {
    this.i = paramBoolean;
  }
  
  protected Color d(ld paramld)
  {
    return d();
  }
  
  public Color d()
  {
    return this.j;
  }
  
  public void b(Color paramColor)
  {
    this.j = paramColor;
  }
  
  public boolean a(ld paramld, double paramDouble1, double paramDouble2)
  {
    double d1 = a(paramld);
    double d2 = b(paramld);
    return new RoundRectangle2D.Double(paramld.a(), paramld.b(), paramld.c(), paramld.d(), d1 + d2, d1 + d2).contains(paramDouble1, paramDouble2);
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.j.o

 * JD-Core Version:    0.7.0.1

 */